package com.bw.kf.all2211a.fg.fgviewModel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModelStore
import com.bw.kf.mvvm.base.BaseRepo
import com.bw.kf.mvvm.entity.UserEntity
import androidx.lifecycle.viewModelScope
import com.bw.kf.mvvm.entity.ResetEntity
import com.google.gson.Gson
import kotlinx.coroutines.launch
import okhttp3.MediaType
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody
import org.json.JSONObject

class MIneViewMode:BaseRepo() {
    val success= MutableLiveData<UserEntity>()
    val fall= MutableLiveData<String>()
    fun getUser(){
        viewModelScope.launch(){
            try {
                val user = aPiText.user()
                success.postValue(user)
            }catch (e:Exception){
                fall.postValue(e.message)
            }
        }
    }
}